package com.jrew.gae.stacktracer.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.google.appengine.api.datastore.Text;

/**
 *	Represents single record entity 
 *
 */
@Entity
@Table(name="RECORDS")
public class Record implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 5557817402925124640L;
	
	/**
	 * 
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE)
	private Long id;
	
	/**
	 * 
	 */
	private Text content;

	/**
	 * 
	 */
	private String password;
	
	/**
	 * 
	 */
	public Record() {}

	/**
	 * @param content
	 */
	public Record(String content){
		this.content = new Text(content);
	}
	
	/**
	 * @return
	 */
	public Text getContent() {
		return content;
	}

	/**
	 * @param content
	 */
	public void setContent(Text content) {
		this.content = content;
	}

	/**
	 * @return
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @return
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 */
	public void setPassword(String password) {
		this.password = password;
	}
}
